package top.jojoace.demo.ConfigurationSelector;

import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;
import top.jojoace.demo.Configuration.ConditionalConfiguration;
import top.jojoace.demo.Configuration.UserConfiguration;

import java.util.function.Predicate;

/**
 * <h1>配置选择器</h1>
 * @author 陈Ser
 * @ClassName UserConfigurationSelector
 * @description: TODO
 * @Date 2021/10/29 17:22
 * @Version 1.0
 */
public class UserConfigurationSelector implements ImportSelector {
    @Override
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {
        //获得全路径命名
        String name = UserConfiguration.class.getName();
        String name2 = ConditionalConfiguration.class.getName();

        //返回由 配置类的全路劲类名 构成的 字符串数组
        return new String[]{
                name,
                name2
        };

    }
}
